package com.ycsj.goldmedalnewconcept.teacher.adapter;

import android.content.Context;
import android.widget.TextView;

import com.ycsj.common.base.CommonAdapter;
import com.ycsj.common.base.ViewHolder;
import com.ycsj.goldmedalnewconcept.R;
import com.ycsj.goldmedalnewconcept.common.bean.OptionInfo;

import java.util.List;

/**
 * 展示答案选项的适配器
 * Created by Administrator on 2019/2/21 0021.
 */

public class ShowAnswerAdapter extends CommonAdapter<OptionInfo> {

    public ShowAnswerAdapter(Context context, List<OptionInfo> datas, int layoutId) {
        super(context, datas, layoutId);
    }

    @Override
    public void convert(ViewHolder holder, OptionInfo optionInfo) {
        //答案序号
        TextView tvIndex = holder.getView(R.id.tv_index);
        tvIndex.setText(optionInfo.optionIndex+":");
        //答案内容
        TextView tvAnswer = holder.getView(R.id.tv_answer);
        tvAnswer.setText(optionInfo.optionContent);

    }
}
